<template>
	<div class="box">
		<h2>弹窗</h2>
		<button @click="show">显示弹出框</button>
		<button @click="show1">显示弹出框1</button>
	</div>
</template>

<script>
export default {
  name: "Index",
  data() {
    return {
      isVisible: false
    };
  },
  methods: {
    show() {
      this.$my_confirm("是否登录?", {
        yesBtnText: "登录"
      })
        .then(() => {
          this.$my_message("跳到登录", "info");
        })
        .catch(() => {
          this.$my_message("取消", "info");
        });
    },
    show1() {
      this.$my_confirm("此操作将永久删除该文件, 是否继续？", "提示", {
        yesBtnText: "是",
        cancelBtnText: "否",
        type: "warning"
      })
        .then(() => {
          this.$my_message({
            content: "文件已删除",
            type: "success"
          });
        })
        .catch(() => {
          this.$my_message("取消删除", "info");
        });
    }
  }
};
</script>
